package day6;

import java.util.Arrays;

//不同类的默认值
//1.整形的默认值都是0
//2.浮点型的默认值都是0.0
//3.布尔型默认为false  char是空字符' '
//4.其他类型默认值一般都是null
public class Demo5 {
    byte n1;
    short n2;
    int n3;
    long n4;

    float n5;
    double n6;

    char n7;
    boolean n8;

    String str;
    int nums[]=new int[5];
    String[] strs=new String[5];
    Demo4 d;
    public void print(){
        System.out.println("整数："+n1+" "+n2+" "+n3+" "+n4);
        System.out.println("浮点数："+n5+" "+n6);
        System.out.println("字符："+n7);
        System.out.println("浮点数："+n8);
        System.out.println("字符串："+str);
        System.out.println("对象："+d);
        System.out.println("整形数组："+ Arrays.toString(nums));
        System.out.println("字符串数组："+Arrays.toString(strs));
    }

    public static void main(String[] args) {
        Demo5 d=new Demo5();
        d.print();
    }
}
